package AtomicDemo.AtomicIntegerFieldUpdaterDemo;

/**
 * @Author: ylc
 * @Description:AtomicIntegerUpdater更新字段
 * @Date Created in 2022-05-14 15:59
 */
public class Test {
    public static void main(String[] args) {
        User user = new User(123,11);
        //开启10个线程
        for (int i = 0; i < 10; i++) {
            new MyThread(user).start();
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(user.toString());
    }
}
